proper height handling, some error has been fixed