improved parsing checks