Added fallback in case height returns 0