Fixed issues mentioned on github