Fixed error and errno