Fix some switchToFrame exception propagation