Fixed wrong class name declaration in object builder.

Fixes #730