Fixed bug

Added permission-checking