fix input unwrapping issue