fixed runtime problems