Fix issues from ticket #1427