Fixed bug where presence of '\n' would cause failure.