Fixed issues with bin script