Fixed several bugs in croquis feature