fix expectation deprecation; closes #1018