Autodetect shapes from input
Fixed an error with test custom classes