Fixed getHeight by adding helper method