Fix for previous commit

Fix code optimization from commit 8f77895