Revert/improve last commit to provide backward compatibility