Had a wrong if statement in first release. use this one

More...