fixed function binding issue when loading