Add proejcts controller test cases & fix some bug