Fixing broken code from commit 13226b950fc405317554075b3c080036935e186e