Fix for thrown exception #1055