Bug changes

Still not working correctly.