bugfix: check empty arrys if errors