Weight check, and some more bug fixes