Fixing problem with obtainActualName in wrong place