fixed bug in I/O builtins when returning K