Fixing parse function