fixed bug in check for change width & height