fixed isProduct function
fixed using errors template