Fixed "Core Dumped", with a return -1; error.