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

see #48 for more information