Fixed bug with wrong memory allocation for strings, generating signal automatically after input