attempt 3 to fix js bug