fixed function undefined error in FF