Bug Fix: Moved location check above module check