Fix build warnings

- wrong attribute order
- unused variable