Fixed bugs with msg variable incorrectly left instead of title