Add static dir and fix this ref bug