Minor code issues fixed