Fix for bug #1285

Change-Id: I7b355a7c2f3960e053b220501703de132a2f5dba