attempt 6 to fix js bug