Fixed bug with last commit, few more small changes