fix code issues after testing