Changed some things so they work properly