fixed missing code issues