Fixed bug in runtime with logging