Updated from original plugin