Added frame mismatch exception; reduced possibility of serious errors due to compile time macros