re-implemented fix for task 1337