Fixed 5 bugs