Fixed terrain async loading issue and removed a recursive function call bug due to image scaling