Fix crazy part of code for deploy package. closes #2753