Fixes #1072 #458