Fix some merge bugs and some errors left over from last commit
Fix some merge bugs and some errors left over from last commit

crr0004/terrian_prototype,crr0004/terrian_prototype,crr0004/terrian_prototype