Fixed small issues which occured in orignal library