Fixed strange JS issue