#136 Fixed up some bugs