very, very ugly fix