Fixed some bugs with platforms