updated for new versions and fixed bin.sh