Fix width and height with -1 value

Fix width and height with -1 value
Reported by: Harish Vijayaraghavan <harishvraghav@gmail.com>

QA Notes:
Testing Done:
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto: