Adds more uniform height calculation for ghost elements