Fixed checking for element height, there can be images not loaded yet