error handling, automatic atlas resizing