fix code issues p2