FIX - preventing negative array size