attempt 4 to fix js bug