fixed some runtime issues