Fixed $.extend call error in init()