fixing some runtime issues