Move to lib
Fix alert