hide loading message at correct time