fix some php notices
cleanup code for bootstrap plugin