Fixed the bug in engine's isValid(). Compare commit 115db5c.