[fix] Parse weight as number.
[fix] Correctly check the arguments.