added tests for previous fixes