I found why it wont work when called in a terminal from another forum.
if you're running ubuntu you may find /bin/sh is symlinked to dash and not bash. sometimes you find weird errors occurring because of that.
So the solution was:
rm /bin/sh
then
ln -s /bin/bash /bin/sh