Bug no 1301

Please review, all comments welcome.