Added new stored procedure code to fix drop issue