remove undefined error