Fixed issue with title being passed as undefined