fix removing camera bug
make the code simplified