Fixed bugs #34, #35