Fixing fatal error