Fixed some bugss