Fixed permission for apparatus, this code is very non-standard.