Fix #48: $ should be passed into the factory method