Fix for bug #1266

Change-Id: Idf863ef3aedd0dea5f94b99bb32d4e60908a3cbc