Fixed parse function