fixed problem with check
added flat