Memory limit and FATAL error fix

THX to Vandam - http://www.trinitycore.org/f/user/8600-vandam/