removeclass fixes #507