Fixes to tickets 903 & 976