fixed bug in base js