Updated to fix Firefox bug