Solved some issues mentioned in #34