fixed code issues