Fixed some bugs with it.