fixes and tests for 316 and 314