merged changes by LeeIzaZombie and bug fixes