Updated accorging to #44 and #66

fixed errors from before