Fixed few functions.