Corrected Bugs

Primitive JS file