fixes #24 (type checking in backend)