Security fix for PM system

Added check for id, when user delete PM.