fixing some bits for heimdal