Fixed error when params passed into new