Fixed bug caused by missing new keyword