Fixed JS error in development code. Closes #2544.