Hotfix issue2269

#2269 fixed and compartmentalized functions