fix code issues