attempt 2 to fix js bug