Fixed metamodel runtime bug and added assertion for JS backend to fix