Fixed first line and missing code issues