Changed code to find exact problem of manage map crashes