ported to 5.3.0, added tests for 5.3.0 and 5.3.3