Updated to fix bug in firefox