fixed issues with current functions.