Fix region selection bug