#439 Fixing some code issues